home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 24
/
Amiga Format AFCD24 (Feb 1998, Issue 108).iso
/
-seriously_amiga-
/
shareware
/
programming
/
c
/
amivogl-mdev
/
send_beer
< prev
next >
Wrap
Text File
|
1998-01-12
|
1KB
|
52 lines
#!/bin/sh
#
# send_beer - very ordinary beer submission
#
# Create a beer submission report and mail to `eric@munnari.oz.au'
# The sender will be placed in `vi' with a copy of the beer submission
# template. When complete, simply exit the editor, and the report will be
# mailed automatically.
#
#
ericmail=echidna@munnari.oz.au
mailer=/usr/ucb/mail
ed=/usr/ucb/vi
tool=`basename $0`
vobs=/tmp/$tool.$$
vobsb=${vobs}b
trap "rm -f $vobs $vobsb; exit" 0 1 2 3 15
sed -e "1,/^#SEND_BEER_FORMAT/d" < $0 > $vobs
cp $vobs $vobsb
$ed $vobs
cmp -s $vobs $vobsb
if (test $? -eq 0 -o `cat $vobs | wc -c` -le 1) then
echo "$tool: cancelled"
else
$mailer $ericmail <$vobs
echo "$tool: sent"
fi
exit 0
#SEND_BEER_FORMAT
Dear Eric,
I thank you kindly for your free software and hope that you continue
to produce work of this kind. To support you I am sending you
<ENTER QUANTITY> cans of <ENTER BRAND>.
Best Regards,
<ENTER NAME>,
<ENTER COMPANY>,
<ENTER CONTACT>,
<ENTER ADDRESS>,
<ENTER PHONE>